/*
 * capaFuse.h
 *
 *  Created on: 20/10/2011
 *      Author: utn_so
 */

#ifndef CAPAFUSE_H_
#define CAPAFUSE_H_


#define FUSE_USE_VERSION 26

#include <fuse.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "cache.h"
#include "utils.h"
#include "log.h"

extern tipoConfigPFS configPFS;
extern Boot_Sector BootSector;
extern uint32_t *TablaFAT;
extern t_log *archLog;

int hello_getattr(const char *path, struct stat *stbuf);
int hello_readdir(const char *path, void *buf, fuse_fill_dir_t filler,off_t offset, struct fuse_file_info *fi);
int hello_open(const char *path, struct fuse_file_info *fi);
int hello_read(const char *path, char *buf, size_t size, off_t offset,struct fuse_file_info *fi);
int hello_rename(const char *path, const char *nuevoNombre);
int hello_truncate(const char *path, off_t offset);
int hello_mkdir(const char *path, mode_t modo);
int hello_unlink(const char *path);
int hello_rmdir(const char *path);
int hello_flush(const char *path, struct fuse_file_info *fi);
int hello_write(const char *path, const char *buf, size_t size, off_t offset, struct fuse_file_info *fi);
int hello_create(const char *path, mode_t modo, struct fuse_file_info *fi);
int hello_release(const char *path, struct fuse_file_info *fi);

char* directorioContenido(const char* path);
char* nombreDestino(const char* path);
unsigned char lfn_checksum(const unsigned char *pFcbName);

#endif /* CAPAFUSE_H_ */
